//////////////////////////////////////////////////////////////////////////
//	File			:	"CHud.h"
//
//	Author			:	Steven Seufert (SMS) 
//	Last Modified	:	January 21, 2012 (SMS)
//
//	Purpose			:	to define the singleton to handle miscellaneous HUD images
/////////////////////////////////////////////////////////////////////////// 
#include <iostream>
using namespace std;
#pragma once

#include <map>
using std::map;
#include <string>
using std::string;

class CPlayer;

class CHud
{
private:
	struct tHUDObject
	{
		string name;
		int posX;
		int posY;
		int width;
		int height;
		float Xscale;
		float Yscale;
		float rotation;
		int centerX;
		int centerY;
		DWORD color;
		int imageID;
	};

	// constructor
	CHud(void) {}
	
	// destructor
	~CHud(void) {}

	// copy constructor
	CHud(const CHud&);

	// assignment operator
	CHud& operator=(const CHud&);

	map <string, tHUDObject> hudObjects;
	
public:	
	static CHud* GetInstance()			{ static CHud instance; return &instance; }

	void SetXPosition(string fileName, int x);
	void SetYPosition(string fileName, int y);
	void SetXScale(string fileName, float fScale);
	void SetYScale(string fileName, float fScale);
	void SetRotation(string fileName, float fRotation);

	///////////////////////////////////////////////////
	//	Function	:	"LoadHUDObjects"
	//	
	//	Last Modified:	January 21, 2012 (SMS)
	//
	//	Input		:	none
	//										
	//	Return		:	none
	//
	//	Purpose		:	Loads the border, Xbox360 buttons, player icons, that will be used in the HUD bar
	//////////////////////////////////////////////////
	void LoadHUDObjects();

	void CreateHudObject(string fileName, int nPosX, int nPosY, int nWidth, int nHeight, float fScaleX, float fScaleY, float fRotation, DWORD dwColor);

	///////////////////////////////////////////////////
	//	Function	:	"DrawHUDbar"
	//	
	//	Last Modified:	January 21, 2012 (SMS)
	//
	//	Input		:	a pointer to player one, and a pointer to player two
	//										
	//	Return		:	none
	//
	//	Purpose		:	draws the HUD border bar, the Xbox 360 buttons, and the player icons
	//////////////////////////////////////////////////
	void DrawHUDBar(CPlayer* playerOne = NULL, CPlayer* playerTwo = NULL);

	void Draw(string fileName);

	///////////////////////////////////////////////////
	//	Function	:	"DrawSpellIcons"
	//	
	//	Last Modified:	January 21, 2012 (SMS)
	//
	//	Input		:	player	-	a pointer to the player who's icons you want to display
	//										
	//	Return		:	none
	//
	//	Purpose		:	To draw player 1's or player 2's spell icons to the HUD bar
	//////////////////////////////////////////////////
	void DrawSpellIcons(CPlayer* player);
	
};



	//struct Position
	//{
	//	int nPosX;
	//	int nPosY;
	//};
	//int m_nHieght;
	//int m_nWidth;
	//int m_nPosX;
	//int m_nPosY;
	//int m_nImageID;
	////char* m_szFileName;
	//string m_szFileName;
	//Position m_spCurrentPosition; 

/*CHud();
	~CHud();
	void Update();
	void Render();
	void CreateHudObject( string szFileName, int nHieght, int nWidth, int PosX, int PosY, int nImageID);
	int GetImageID() const { return m_nImageID; }
	void SetImageID(int val) { m_nImageID = val; }
	int GetPosY() const { return m_nPosY; }
	void SetPosY(int val) { m_nPosY = val; }
	int GetPosX() const { return m_nPosX; }
	void SetPosX(int val) { m_nPosX = val; }
	int GetHieght() const { return m_nHieght; }
	void SetHieght(int val) { m_nHieght = val; }
	int GetWidth() const { return m_nWidth; }
	void SetWidth(int val) { m_nWidth = val; }
	Position GetPosition()const{return m_spCurrentPosition;}
	void SetPosition(int nPosX, int nPosY){m_spCurrentPosition.nPosX = nPosX; m_spCurrentPosition.nPosY = nPosY;}

	string GetFileName() const { return m_szFileName.c_str(); }
	void SetFileName(string val) { m_szFileName = val; }*/
	
	/*
	char* GetFileName() const { return m_szFileName; }
		void SetFileName(char* val) { m_szFileName = val; }*/